<script setup>
import { onMounted,ref } from 'vue';
import { getUserListAPI } from '../../../api/userlist';
const data = ref([]);
const User = async () =>{
    const { data: response } = await getUserListAPI(1, 10);
    console.log('res:', response.items);
    data.value = response.items;
    console.log('data:', data.value);
}

onMounted(
    User
)

</script>

<template>
<el-table :data="data" style="width: 100%" border>
    <el-table-column prop="id" label="序号" width="180" />
    <el-table-column prop="username" label="姓名" width="180" />
    <el-table-column prop="email" label="邮箱" width="180" />
    <el-table-column prop="password" label="权限" />
  </el-table>
</template>

<style scoped>

</style>
